Skip to content

feat: emit TaskBlock events for native socket I/O#666

Draft
kaahos wants to merge 16 commits into
mainfrom
paul.fournillon/taskblock-native-io
Draft

feat: emit TaskBlock events for native socket I/O#666
kaahos wants to merge 16 commits into
mainfrom
paul.fournillon/taskblock-native-io

Conversation

@kaahos

@kaahos kaahos commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?:

Adds native socket I/O TaskBlock instrumentation on Linux by interposing blocking socket APIs, classifying socket file descriptors, and recording synchronous TaskBlock events for owned native I/O waits.

Motivation:

Blocking native I/O is a major source of wall-clock time. Recording these intervals directly avoids intentionally signaling threads while they are blocked in recognized socket operations.

Additional Notes:

This PR includes Linux native interposition, socket/Fd classification, lifecycle handling for unloadable libraries, integration tests, and a native socket I/O benchmark.

How to test the change?:

Automated coverage includes native unit tests for interposition, socket sampling, native block handling, thread-filter suppression, and Java integration tests for native socket TaskBlock behavior.

  • ./.claude/commands/build-and-summarize testDebug

Native socket integration tests are Linux-specific and skip on macOS.

For Datadog employees:

  • If this PR touches code that signs or publishes builds or packages, or handles credentials of any kind, I've requested a security review (run the dd:platform-security-review skill, or file a request via the PSEC review form).
    bewaire also runs automatically on every PR.
  • This PR doesn't touch any of that.
  • JIRA: [JIRA-XXXX]

@datadog-datadog-prod-us1

datadog-datadog-prod-us1 Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Pipelines

Unblock PR with BitsAI

⚠️ Warnings

🚦 30 Pipeline jobs failed

CI Run | test-matrix / test-linux-glibc-aarch64 (8-j9, debug)   View in Datadog   GitHub Actions

CI Run | test-matrix / test-linux-glibc-amd64 (11, debug)   View in Datadog   GitHub Actions

CI Run | test-matrix / test-linux-glibc-amd64 (11-j9, debug)   View in Datadog   GitHub Actions

View all 30 failed jobs.

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 7a6627e | Docs | Datadog PR Page | Give us feedback!

@dd-octo-sts

dd-octo-sts Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

CI Test Results

Run: #29751362461 | Commit: 3e1d48e | Duration: 10m 36s (longest job)

24 of 32 test jobs failed

Status Overview

JDK glibc-aarch64/debug glibc-amd64/debug musl-aarch64/debug musl-amd64/debug
8 - - -
8-ibm - - -
8-j9 - -
8-librca - -
8-orcl - - -
11 - - -
11-j9 - -
11-librca - -
17 - -
17-graal - -
17-j9 - -
17-librca - -
21 - -
21-graal - -
21-librca - -
25 - -
25-graal - -
25-librca - -

Legend: ✅ passed | ❌ failed | ⚪ skipped | 🚫 cancelled

Failed Tests

musl-aarch64/debug / 25-librca

Job: View logs

No detailed failure information available. Check the job logs.

musl-aarch64/debug / 8-librca

Job: View logs

No detailed failure information available. Check the job logs.

musl-aarch64/debug / 17-librca

Job: View logs

No detailed failure information available. Check the job logs.

musl-aarch64/debug / 11-librca

Job: View logs

No detailed failure information available. Check the job logs.

musl-aarch64/debug / 21-librca

Job: View logs

No detailed failure information available. Check the job logs.

musl-amd64/debug / 21-librca

Job: View logs

No detailed failure information available. Check the job logs.

musl-amd64/debug / 8-librca

Job: View logs

No detailed failure information available. Check the job logs.

musl-amd64/debug / 25-librca

Job: View logs

No detailed failure information available. Check the job logs.

glibc-aarch64/debug / 8-j9

Job: View logs

No detailed failure information available. Check the job logs.

musl-amd64/debug / 17-librca

Job: View logs

No detailed failure information available. Check the job logs.

musl-amd64/debug / 11-librca

Job: View logs

No detailed failure information available. Check the job logs.

glibc-amd64/debug / 11-j9

Job: View logs

No detailed failure information available. Check the job logs.

glibc-amd64/debug / 21

Job: View logs

No detailed failure information available. Check the job logs.

glibc-amd64/debug / 25

Job: View logs

No detailed failure information available. Check the job logs.

glibc-amd64/debug / 8-j9

Job: View logs

No detailed failure information available. Check the job logs.

glibc-amd64/debug / 8

Job: View logs

No detailed failure information available. Check the job logs.

glibc-amd64/debug / 17-graal

Job: View logs

No detailed failure information available. Check the job logs.

glibc-amd64/debug / 11

Job: View logs

No detailed failure information available. Check the job logs.

glibc-amd64/debug / 25-graal

Job: View logs

No detailed failure information available. Check the job logs.

glibc-amd64/debug / 8-ibm

Job: View logs

No detailed failure information available. Check the job logs.

glibc-amd64/debug / 8-orcl

Job: View logs

No detailed failure information available. Check the job logs.

glibc-amd64/debug / 21-graal

Job: View logs

No detailed failure information available. Check the job logs.

glibc-amd64/debug / 17

Job: View logs

No detailed failure information available. Check the job logs.

glibc-amd64/debug / 17-j9

Job: View logs

No detailed failure information available. Check the job logs.

Summary: Total: 32 | Passed: 8 | Failed: 24


Updated: 2026-07-20 14:50:50 UTC

@kaahos
kaahos force-pushed the paul.fournillon/taskblock-native-io branch 5 times, most recently from 5de84e2 to c4a2496 Compare July 17, 2026 09:44
@dd-octo-sts

dd-octo-sts Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Benchmark Results (commit 4077c10)

Pipeline: https://gitlab.ddbuild.io/DataDog/apm-reliability/benchmarking-platform/-/pipelines/125241502 Commit: 4077c10d812d39470e41a46ffb6dd02dfe10ae05

⚠️ Significant outliers

  • 🟢 future-genetic (JDK 25): runtime -3.2% (2072→2005 ms)
Runtime details (per benchmark × JDK)
Benchmark JDK Latest Dev Δ (dev vs latest) Issues L/D
akka-uct 21 ✅ 10318 ms (21 iters) ✅ 10297 ms (21 iters) ≈ -0.2% (±11.5%) — / —
akka-uct 25 ✅ 8877 ms (24 iters) ✅ 8872 ms (24 iters) ≈ -0.1% (±10%) — / —
finagle-chirper 21 ✅ 5924 ms (33 iters) ✅ 6023 ms (33 iters) ≈ +1.7% (±25.7%) ⚠️ W:3 / ⚠️ W:3
finagle-chirper 25 ✅ 5440 ms (36 iters) ✅ 5447 ms (36 iters) ≈ +0.1% (±24%) ⚠️ W:3 / ⚠️ W:3
fj-kmeans 25 ✅ 2819 ms (66 iters) ✅ 2768 ms (68 iters) ≈ -1.8% (±2.7%) — / —
future-genetic 21 ✅ 2100 ms (89 iters) ✅ 2118 ms (87 iters) ≈ +0.9% (±2.8%) — / —
future-genetic 25 ✅ 2072 ms (89 iters) ✅ 2005 ms (93 iters) 🟢 -3.2% — / —
naive-bayes 25 ✅ 990 ms (172 iters) ✅ 1017 ms (169 iters) ≈ +2.7% (±31.9%) — / —
reactors 21 ✅ 16610 ms (15 iters) ✅ 16761 ms (15 iters) ≈ +0.9% (±8%) — / —
reactors 25 ✅ 18536 ms (15 iters) ✅ 18473 ms (15 iters) ≈ -0.3% (±2.8%) — / —
Internal counter details (ddprof)

ddprof internal counters, latest / dev (✅ = 0, · = unavailable):

Benchmark JDK Dropped rec Dropped jvmti Dropped trace Skipped WC AGCT fail Unwind fail
akka-uct 21 ✅ / ✅ ✅ / ✅ ✅ / 1 2000 / 2002 ✅ / ✅ ✅ / ✅
akka-uct 25 ✅ / ✅ ✅ / ✅ 1 / 4 2240 / 2285 ✅ / ✅ ✅ / ✅
finagle-chirper 21 ✅ / ✅ ✅ / ✅ 3 / 4 8783 / 8895 ✅ / ✅ ✅ / ✅
finagle-chirper 25 ✅ / ✅ ✅ / ✅ 2 / 3 8381 / 7985 ✅ / ✅ ✅ / ✅
fj-kmeans 21 ✅ / ✅ ✅ / ✅ 4 / ✅ 1321 / ✅ ✅ / ✅ ✅ / ✅
fj-kmeans 25 ✅ / ✅ ✅ / ✅ 2 / 3 1268 / 1276 ✅ / ✅ ✅ / ✅
future-genetic 21 ✅ / ✅ ✅ / ✅ ✅ / 2 2969 / 2966 ✅ / ✅ ✅ / ✅
future-genetic 25 ✅ / ✅ ✅ / ✅ 3 / 1 2828 / 2888 ✅ / ✅ ✅ / ✅
naive-bayes 21 ✅ / ✅ ✅ / ✅ ✅ / ✅ ✅ / ✅ ✅ / ✅ ✅ / ✅
naive-bayes 25 ✅ / ✅ ✅ / ✅ 1 / 4 3471 / 3500 ✅ / ✅ ✅ / ✅
reactors 21 ✅ / ✅ ✅ / ✅ ✅ / 1 1675 / 1607 ✅ / ✅ ✅ / ✅
reactors 25 ✅ / ✅ ✅ / ✅ 1 / ✅ 1935 / 1843 ✅ / ✅ ✅ / ✅

@kaahos
kaahos force-pushed the paul.fournillon/taskblock-native-io branch 2 times, most recently from dc6d97a to 8ad829e Compare July 20, 2026 10:03
@kaahos
kaahos force-pushed the paul.fournillon/taskblock-native-io branch from 8ad829e to 7a6627e Compare July 20, 2026 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant